const db = require("./db/index")

const sql = 'select * from ev_aricde_cate'
db.query(sql,(err,res)=>{
  if (err) {
    return console.log(err.message);
  }
  // const test=[]
  for (let i = 0; i < res.length; i++) {
    let {age,name} = res[i]
    let arr = [{
      age,
      name
    }]
    console.log(arr);
  }
  
  
  // res.forEach(item => {
  //  let name = {name:item.name}
  // });
 
})